Public Sub SelectableTab()

'Add the Selectable Layers tab to the TOC. Copy this code to the Normal.mxt -> ThisDocument
'to make it available by default.

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument
Dim i As Integer
For i = 0 To pMxDoc.ContentsViewCount - 1
  If pMxDoc.ContentsView(i).Name = "Selection" Then
  pMxDoc.ContentsView(i).Visible = True
  pMxDoc.UpdateContents
  Application.RefreshWindow
  End If
Next i

'Don't prompt to save the MXD if this is the only change
Dim pDocDirty As IDocumentDirty2
Set pDocDirty = ThisDocument
pDocDirty.SetClean

End Sub

Private Function MxDocument_NewDocument() As Boolean

'Add the tab when creating a new MXD
Call SelectableTab

End Function

Private Function MxDocument_OpenDocument() As Boolean

'Add the tab when opening an existing MXD
Call SelectableTab

End Function

